package main

import "fmt"

func main() {
	//请实现map中包含切片与切片中包含map的两种数组结构

	//map1 := make(map[string][]int)
	////var map1  map[string][]int //这样可不可以？
	//map1["ji"] = []int{1,3,5,7,9}
	//map1["ou"] = []int{2,4,6,8}
	//fmt.Println(map1,"====", map1["ji"][2])

	//fmt.Println("=======================================")
	//
	//age := make([]map[string]int,5)
	//age[0] = make(map[string]int)  //为什么要初始化？
	//age[2] = make(map[string]int)
	//
	//age[0]["张三"] = 33
	//age[0]["张四"] = 44
	//
	//age[2]["李四"] = 24
	//fmt.Println(age)

	//一个不初始化的例子
	fmt.Println("=======================================")
	age2 := make([]map[string]int,5)
	age2[2] = map[string]int{"张三":2}
	tm := make(map[string]int)
	tm["李四"] = 33
	age2[3] = tm
	fmt.Println(age2)

}
